
<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <meta charset="utf-8" />
  <title>CMakeGraphVizOptions &mdash; CMake 3.16.5 Documentation</title>

    <link rel="stylesheet" href="../_static/cmake.css" type="text/css" />
    <link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
    
    <script type="text/javascript" id="documentation_options" data-url_root="../" src="../_static/documentation_options.js"></script>
    <script type="text/javascript" src="../_static/jquery.js"></script>
    <script type="text/javascript" src="../_static/underscore.js"></script>
    <script type="text/javascript" src="../_static/doctools.js"></script>
    <script type="text/javascript" src="../_static/language_data.js"></script>
    
    <link rel="shortcut icon" href="../_static/cmake-favicon.ico"/>
    <link rel="index" title="Index" href="../genindex.html" />
    <link rel="search" title="Search" href="../search.html" />
    <link rel="next" title="CMakePackageConfigHelpers" href="CMakePackageConfigHelpers.html" />
    <link rel="prev" title="CMakeFindPackageMode" href="CMakeFindPackageMode.html" />
  
 

  </head><body>
    <div class="related" role="navigation" aria-label="related navigation">
      <h3>Navigation</h3>
      <ul>
        <li class="right" style="margin-right: 10px">
          <a href="../genindex.html" title="General Index"
             accesskey="I">index</a></li>
        <li class="right" >
          <a href="CMakePackageConfigHelpers.html" title="CMakePackageConfigHelpers"
             accesskey="N">next</a> |</li>
        <li class="right" >
          <a href="CMakeFindPackageMode.html" title="CMakeFindPackageMode"
             accesskey="P">previous</a> |</li>
  <li>
    <img src="../_static/cmake-logo-16.png" alt=""
         style="vertical-align: middle; margin-top: -2px" />
  </li>
  <li>
    <a href="https://cmake.org/">CMake</a> &#187;
  </li>
  <li>
    <a href="../index.html">3.16.5 Documentation</a> &#187;
  </li>

          <li class="nav-item nav-item-1"><a href="../manual/cmake-modules.7.html" accesskey="U">cmake-modules(7)</a> &#187;</li> 
      </ul>
    </div>  

    <div class="document">
      <div class="documentwrapper">
        <div class="bodywrapper">
          <div class="body" role="main">
            
  <div class="section" id="cmakegraphvizoptions">
<span id="module:CMakeGraphVizOptions"></span><h1>CMakeGraphVizOptions<a class="headerlink" href="#cmakegraphvizoptions" title="Permalink to this headline">¶</a></h1>
<p>The builtin graphviz support of CMake.</p>
<div class="section" id="variables-specific-to-the-graphviz-support">
<h2>Variables specific to the graphviz support<a class="headerlink" href="#variables-specific-to-the-graphviz-support" title="Permalink to this headline">¶</a></h2>
<p>CMake
can generate <a class="reference external" href="http://www.graphviz.org/">graphviz</a> files, showing the dependencies between the
targets in a project and also external libraries which are linked
against.  When CMake is run with the <code class="docutils literal notranslate"><span class="pre">--graphviz=foo.dot</span></code> option, it will
produce:</p>
<ul class="simple">
<li><p>a <code class="docutils literal notranslate"><span class="pre">foo.dot</span></code> file showing all dependencies in the project</p></li>
<li><p>a <code class="docutils literal notranslate"><span class="pre">foo.dot.&lt;target&gt;</span></code> file for each target, file showing on which other targets the respective target depends</p></li>
<li><p>a <code class="docutils literal notranslate"><span class="pre">foo.dot.&lt;target&gt;.dependers</span></code> file, showing which other targets depend on the respective target</p></li>
</ul>
<p>The different dependency types <code class="docutils literal notranslate"><span class="pre">PUBLIC</span></code>, <code class="docutils literal notranslate"><span class="pre">PRIVATE</span></code> and <code class="docutils literal notranslate"><span class="pre">INTERFACE</span></code>
are represented as solid, dashed and dotted edges.</p>
<p>This can result in huge graphs.  Using the file
<code class="docutils literal notranslate"><span class="pre">CMakeGraphVizOptions.cmake</span></code> the look and content of the generated
graphs can be influenced.  This file is searched first in
<span class="target" id="index-0-variable:CMAKE_BINARY_DIR"></span><a class="reference internal" href="../variable/CMAKE_BINARY_DIR.html#variable:CMAKE_BINARY_DIR" title="CMAKE_BINARY_DIR"><code class="xref cmake cmake-variable docutils literal notranslate"><span class="pre">CMAKE_BINARY_DIR</span></code></a> and then in <span class="target" id="index-0-variable:CMAKE_SOURCE_DIR"></span><a class="reference internal" href="../variable/CMAKE_SOURCE_DIR.html#variable:CMAKE_SOURCE_DIR" title="CMAKE_SOURCE_DIR"><code class="xref cmake cmake-variable docutils literal notranslate"><span class="pre">CMAKE_SOURCE_DIR</span></code></a>.  If found, it is
read and the variables set in it are used to adjust options for the
generated graphviz files.</p>
<dl class="variable">
<dt id="variable:GRAPHVIZ_GRAPH_TYPE">
<code class="sig-name descname">GRAPHVIZ_GRAPH_TYPE</code><a class="headerlink" href="#variable:GRAPHVIZ_GRAPH_TYPE" title="Permalink to this definition">¶</a></dt>
<dd><p>The graph type.</p>
<ul class="simple">
<li><p>Mandatory : NO</p></li>
<li><p>Default   : “digraph”</p></li>
</ul>
<p>Valid graph types are:</p>
<ul class="simple">
<li><p>“graph” : Nodes are joined with lines</p></li>
<li><p>“digraph” : Nodes are joined with arrows showing direction</p></li>
<li><p>“strict graph” : Like “graph” but max one line between each node</p></li>
<li><p>“strict digraph” : Like “graph” but max one line between each node in each direction</p></li>
</ul>
</dd></dl>

<dl class="variable">
<dt id="variable:GRAPHVIZ_GRAPH_NAME">
<code class="sig-name descname">GRAPHVIZ_GRAPH_NAME</code><a class="headerlink" href="#variable:GRAPHVIZ_GRAPH_NAME" title="Permalink to this definition">¶</a></dt>
<dd><p>The graph name.</p>
<ul class="simple">
<li><p>Mandatory : NO</p></li>
<li><p>Default   : “GG”</p></li>
</ul>
</dd></dl>

<dl class="variable">
<dt id="variable:GRAPHVIZ_GRAPH_HEADER">
<code class="sig-name descname">GRAPHVIZ_GRAPH_HEADER</code><a class="headerlink" href="#variable:GRAPHVIZ_GRAPH_HEADER" title="Permalink to this definition">¶</a></dt>
<dd><p>The header written at the top of the graphviz file.</p>
<ul class="simple">
<li><p>Mandatory : NO</p></li>
<li><p>Default   : “node [n  fontsize = “12”];”</p></li>
</ul>
</dd></dl>

<dl class="variable">
<dt id="variable:GRAPHVIZ_NODE_PREFIX">
<code class="sig-name descname">GRAPHVIZ_NODE_PREFIX</code><a class="headerlink" href="#variable:GRAPHVIZ_NODE_PREFIX" title="Permalink to this definition">¶</a></dt>
<dd><p>The prefix for each node in the graphviz file.</p>
<ul class="simple">
<li><p>Mandatory : NO</p></li>
<li><p>Default   : “node”</p></li>
</ul>
</dd></dl>

<dl class="variable">
<dt id="variable:GRAPHVIZ_EXECUTABLES">
<code class="sig-name descname">GRAPHVIZ_EXECUTABLES</code><a class="headerlink" href="#variable:GRAPHVIZ_EXECUTABLES" title="Permalink to this definition">¶</a></dt>
<dd><p>Set this to FALSE to exclude executables from the generated graphs.</p>
<ul class="simple">
<li><p>Mandatory : NO</p></li>
<li><p>Default   : TRUE</p></li>
</ul>
</dd></dl>

<dl class="variable">
<dt id="variable:GRAPHVIZ_STATIC_LIBS">
<code class="sig-name descname">GRAPHVIZ_STATIC_LIBS</code><a class="headerlink" href="#variable:GRAPHVIZ_STATIC_LIBS" title="Permalink to this definition">¶</a></dt>
<dd><p>Set this to FALSE to exclude static libraries from the generated graphs.</p>
<ul class="simple">
<li><p>Mandatory : NO</p></li>
<li><p>Default   : TRUE</p></li>
</ul>
</dd></dl>

<dl class="variable">
<dt id="variable:GRAPHVIZ_SHARED_LIBS">
<code class="sig-name descname">GRAPHVIZ_SHARED_LIBS</code><a class="headerlink" href="#variable:GRAPHVIZ_SHARED_LIBS" title="Permalink to this definition">¶</a></dt>
<dd><p>Set this to FALSE to exclude shared libraries from the generated graphs.</p>
<ul class="simple">
<li><p>Mandatory : NO</p></li>
<li><p>Default   : TRUE</p></li>
</ul>
</dd></dl>

<dl class="variable">
<dt id="variable:GRAPHVIZ_MODULE_LIBS">
<code class="sig-name descname">GRAPHVIZ_MODULE_LIBS</code><a class="headerlink" href="#variable:GRAPHVIZ_MODULE_LIBS" title="Permalink to this definition">¶</a></dt>
<dd><p>Set this to FALSE to exclude module libraries from the generated graphs.</p>
<ul class="simple">
<li><p>Mandatory : NO</p></li>
<li><p>Default   : TRUE</p></li>
</ul>
</dd></dl>

<dl class="variable">
<dt id="variable:GRAPHVIZ_EXTERNAL_LIBS">
<code class="sig-name descname">GRAPHVIZ_EXTERNAL_LIBS</code><a class="headerlink" href="#variable:GRAPHVIZ_EXTERNAL_LIBS" title="Permalink to this definition">¶</a></dt>
<dd><p>Set this to FALSE to exclude external libraries from the generated graphs.</p>
<ul class="simple">
<li><p>Mandatory : NO</p></li>
<li><p>Default   : TRUE</p></li>
</ul>
</dd></dl>

<dl class="variable">
<dt id="variable:GRAPHVIZ_IGNORE_TARGETS">
<code class="sig-name descname">GRAPHVIZ_IGNORE_TARGETS</code><a class="headerlink" href="#variable:GRAPHVIZ_IGNORE_TARGETS" title="Permalink to this definition">¶</a></dt>
<dd><p>A list of regular expressions for ignoring targets.</p>
<ul class="simple">
<li><p>Mandatory : NO</p></li>
<li><p>Default   : empty</p></li>
</ul>
</dd></dl>

<dl class="variable">
<dt id="variable:GRAPHVIZ_GENERATE_PER_TARGET">
<code class="sig-name descname">GRAPHVIZ_GENERATE_PER_TARGET</code><a class="headerlink" href="#variable:GRAPHVIZ_GENERATE_PER_TARGET" title="Permalink to this definition">¶</a></dt>
<dd><p>Set this to FALSE to exclude per target graphs <code class="docutils literal notranslate"><span class="pre">foo.dot.&lt;target&gt;</span></code>.</p>
<ul class="simple">
<li><p>Mandatory : NO</p></li>
<li><p>Default   : TRUE</p></li>
</ul>
</dd></dl>

<dl class="variable">
<dt id="variable:GRAPHVIZ_GENERATE_DEPENDERS">
<code class="sig-name descname">GRAPHVIZ_GENERATE_DEPENDERS</code><a class="headerlink" href="#variable:GRAPHVIZ_GENERATE_DEPENDERS" title="Permalink to this definition">¶</a></dt>
<dd><p>Set this to FALSE to exclude depender graphs <code class="docutils literal notranslate"><span class="pre">foo.dot.&lt;target&gt;.dependers</span></code>.</p>
<ul class="simple">
<li><p>Mandatory : NO</p></li>
<li><p>Default   : TRUE</p></li>
</ul>
</dd></dl>

</div>
</div>


          </div>
        </div>
      </div>
      <div class="sphinxsidebar" role="navigation" aria-label="main navigation">
        <div class="sphinxsidebarwrapper">
  <h3><a href="../index.html">Table of Contents</a></h3>
  <ul>
<li><a class="reference internal" href="#">CMakeGraphVizOptions</a><ul>
<li><a class="reference internal" href="#variables-specific-to-the-graphviz-support">Variables specific to the graphviz support</a></li>
</ul>
</li>
</ul>

  <h4>Previous topic</h4>
  <p class="topless"><a href="CMakeFindPackageMode.html"
                        title="previous chapter">CMakeFindPackageMode</a></p>
  <h4>Next topic</h4>
  <p class="topless"><a href="CMakePackageConfigHelpers.html"
                        title="next chapter">CMakePackageConfigHelpers</a></p>
  <div role="note" aria-label="source link">
    <h3>This Page</h3>
    <ul class="this-page-menu">
      <li><a href="../_sources/module/CMakeGraphVizOptions.rst.txt"
            rel="nofollow">Show Source</a></li>
    </ul>
   </div>
<div id="searchbox" style="display: none" role="search">
  <h3 id="searchlabel">Quick search</h3>
    <div class="searchformwrapper">
    <form class="search" action="../search.html" method="get">
      <input type="text" name="q" aria-labelledby="searchlabel" />
      <input type="submit" value="Go" />
    </form>
    </div>
</div>
<script type="text/javascript">$('#searchbox').show(0);</script>
        </div>
      </div>
      <div class="clearer"></div>
    </div>
    <div class="related" role="navigation" aria-label="related navigation">
      <h3>Navigation</h3>
      <ul>
        <li class="right" style="margin-right: 10px">
          <a href="../genindex.html" title="General Index"
             >index</a></li>
        <li class="right" >
          <a href="CMakePackageConfigHelpers.html" title="CMakePackageConfigHelpers"
             >next</a> |</li>
        <li class="right" >
          <a href="CMakeFindPackageMode.html" title="CMakeFindPackageMode"
             >previous</a> |</li>
  <li>
    <img src="../_static/cmake-logo-16.png" alt=""
         style="vertical-align: middle; margin-top: -2px" />
  </li>
  <li>
    <a href="https://cmake.org/">CMake</a> &#187;
  </li>
  <li>
    <a href="../index.html">3.16.5 Documentation</a> &#187;
  </li>

          <li class="nav-item nav-item-1"><a href="../manual/cmake-modules.7.html" >cmake-modules(7)</a> &#187;</li> 
      </ul>
    </div>
    <div class="footer" role="contentinfo">
        &#169; Copyright 2000-2019 Kitware, Inc. and Contributors.
      Created using <a href="http://sphinx-doc.org/">Sphinx</a> 2.1.2.
    </div>
  </body>
</html>